package main

import (
	"fmt"
	"reflect"
	"strings"
	"time"
)

func Print(x interface{}) {
	of := reflect.ValueOf(x)
	t := of.Type()
	fmt.Println("type ", t)
	for i := 0; i < of.NumMethod(); i++ {
		name := t.Method(i).Name
		methType := of.Method(i).Type()
		fmt.Printf("func (%s) %s%s\n", t, name, strings.TrimPrefix(methType.String(), "func"))
	}
}

func main() {
	Print(time.Hour)
}
